import axios from '../../axios'
// 保存一级路径
const CLIENTS_URL='/clients'
const cosutomersApi = {
    // 获取所有客户
    getClients(params){
        return axios({
            url:CLIENTS_URL+'/'+'getClient',
            method:'get',
            params
        })
    },
    addClients(data) {
        return axios({
            url: CLIENTS_URL+'/'+'addClients',
            method: 'post',
            data
        })
    },
    deletClient(data){
        return axios ({
            url: CLIENTS_URL+'/'+'deletClient',
            method: 'post',
            data
        })
    },
    getClientsById(data){
        return axios({
            url: CLIENTS_URL+"/"+data,
            method: 'get',
        })
    },
     //  修改
     changeCustomers: function (data) {
        return axios({
            url: CLIENTS_URL,
            method: "put",
            data
        })
    },
    // 获取销售员
    getSales:function(data){
        return axios({
            url:"/sales/getSales",
            method:'get',
            data
        })
    },
       // 获取产品
       getProduct:function(data){
        return axios({
            url:"/insurance/getInsurance",
            method:'get',
            data
        })
    },
       // 获取产品类型
       getProductType:function(data){
        return axios({
            url:"/insuranceType/lgetAllInsurances",
            method:'get',
            data
        })
    },
}

export default cosutomersApi;